<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广东工业大学招生办后台管理</title>
<link rel="stylesheet" href="${ctx }/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="${ctx }/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="${ctx }/kindeditor/lang/zh_CN.js"></script>

<script>
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="entity.introduce"]', {
			cssPath : '${ctx}/kindeditor/plugins/code/prettify.css',
				uploadJson :  '${ctx}/kindeditor/jsp/upload_json.jsp',  
				fileManagerJson : '${ctx}/kindeditor/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['article'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['article'].submit();
					});
				}
			});
			prettyPrint();
		});
	function check(){
		var title = document.getElementById("title");
		var college = document.getElementById("college");
		if(college.value==""){
			alert("请输入学院！");
			return false;
		}
		if(title.value==""){
			alert("请输入专业！");
			return false;
		}
		if(editor.isEmpty()){
			alert("请输入内容！");
			return false;
		}
		else true;
	}
</script>
<script language="javascript">
function delcfm(){
	if (confirm("确定删除？")){
				return true;
		}else{
			return false;
	}
}
</script>
</head>

<body>
	<div class="article">
		<form action="major-admin!save.action" method="post" name="article" onsubmit="return GetContents()" >
		<s:if test="id!=null">
			<input type="hidden" name="id" value="${entity.id}"/>
		    <input type="hidden" name="academyId" value="${entity.academy.id}"/>
		 </s:if>
		<table style="width:100%">
			 <tr>
					<td align="right">学院名称：</td>
					<td style="font-size:28px;text-align:center">
						<input type="text"  name="entity.academy.name" value="${entity.academy.name}" id="title" style="width:100%" />
					</td>
				</tr>
		      <tr>
					<td align="right">专业名称：</td>
					<td style="font-size:28px;text-align:center">
						<input type="text"  name="entity.name" value="${entity.name}" id="title1" style="width:100%" />
					</td>
				</tr>

				<tr>
					<td align="right">介绍：</td>
					<td>
						<textarea name="entity.introduce" style="width:100%;height:400px;visibility:hidden;">${entity.introduce }</textarea>
					</td>
				</tr>
				<tr>
					<td></td>
					<td align="right">
						<input type="submit" class="button" value="确定编辑" style="width:80px;" /> 
					</td>
				</tr>
			</table>
				
		<a href="major-admin!delete.action?id=${entity.id}" onClick="return delcfm()" >删除</a>


		</form>
	</div>
</body>
</html>
